package com.demo.web.admin;

import org.apache.commons.codec.digest.DigestUtils;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;

import com.bluering.framework.common.log.Logger;

@SpringBootApplication(exclude={DataSourceAutoConfiguration.class,HibernateJpaAutoConfiguration.class})
public class DemoWebAdminApplication extends SpringBootServletInitializer  {
	
	private static Logger logger =Logger.getLogger(DemoWebAdminApplication.class);

	@Override
	protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
		logger.info("abcd1234:{}",DigestUtils.md5Hex("abcd1234"));
		System.setProperty("java.awt.headless", "true");
		return builder.sources(DemoWebAdminApplication.class);
	}

	public static void main(String[] args) {
		logger.info("abcd1234:{}",DigestUtils.md5Hex("abcd1234"));
		System.setProperty("java.awt.headless", "true");//应对服务器无显示器或虚拟显示器时图片验证码无法显示
		SpringApplication.run(DemoWebAdminApplication.class, args);
	}
}
